package com.itheima.d2_if_else;

/**
 * @author Dushaohua
 * @date 2024/4/17 11:37
 */
public class Student {
    String name;
    double score;
    public void printPass(){
        if (score >= 60){
            System.out.println("恭喜：" + name + " 考试通过");
        }else {
            System.out.println("抱歉: " + name + " 考试不合格");
        }
    }

    public void printPass2(){
        System.out.println(score >= 60? "考试通过":"考试挂科");
    }
}
